3.9 \(\int \csc ^5(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx\)

Optimal. Leaf size=86 \[ -\frac{a^2 c \cot ^3(e+f x)}{3 f}+\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{a^2 c \cot (e+f x) \csc (e+f x)}{8 f} \]

[Out]

(a^2*c*ArcTanh[Cos[e + f*x]])/(8*f) - (a^2*c*Cot[e + f*x]^3)/(3*f) + (a^2*c*Cot[e + f*x]*Csc[e + f*x])/(8*f) -
 (a^2*c*Cot[e + f*x]*Csc[e + f*x]^3)/(4*f)

________________________________________________________________________________________

Rubi [A]  time = 0.150049, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 5, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.156, Rules used = {2966, 3767, 8, 3768, 3770} \[ -\frac{a^2 c \cot ^3(e+f x)}{3 f}+\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{a^2 c \cot (e+f x) \csc (e+f x)}{8 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^5*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

(a^2*c*ArcTanh[Cos[e + f*x]])/(8*f) - (a^2*c*Cot[e + f*x]^3)/(3*f) + (a^2*c*Cot[e + f*x]*Csc[e + f*x])/(8*f) -
 (a^2*c*Cot[e + f*x]*Csc[e + f*x]^3)/(4*f)

Rule 2966

Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.
)*(x_)]), x_Symbol] :> Int[ExpandTrig[sin[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; Fr
eeQ[{a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && IntegerQ[n]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \csc ^5(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=\int \left (-a^2 c \csc ^2(e+f x)-a^2 c \csc ^3(e+f x)+a^2 c \csc ^4(e+f x)+a^2 c \csc ^5(e+f x)\right ) \, dx\\ &=-\left (\left (a^2 c\right ) \int \csc ^2(e+f x) \, dx\right )-\left (a^2 c\right ) \int \csc ^3(e+f x) \, dx+\left (a^2 c\right ) \int \csc ^4(e+f x) \, dx+\left (a^2 c\right ) \int \csc ^5(e+f x) \, dx\\ &=\frac{a^2 c \cot (e+f x) \csc (e+f x)}{2 f}-\frac{a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{1}{2} \left (a^2 c\right ) \int \csc (e+f x) \, dx+\frac{1}{4} \left (3 a^2 c\right ) \int \csc ^3(e+f x) \, dx+\frac{\left (a^2 c\right ) \operatorname{Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}-\frac{\left (a^2 c\right ) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac{a^2 c \cot ^3(e+f x)}{3 f}+\frac{a^2 c \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{1}{8} \left (3 a^2 c\right ) \int \csc (e+f x) \, dx\\ &=\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{a^2 c \cot ^3(e+f x)}{3 f}+\frac{a^2 c \cot (e+f x) \csc (e+f x)}{8 f}-\frac{a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}\\ \end{align*}

Mathematica [B]  time = 0.0624187, size = 179, normalized size = 2.08 \[ \frac{a^2 c \cot (e+f x)}{3 f}-\frac{a^2 c \csc ^4\left (\frac{1}{2} (e+f x)\right )}{64 f}+\frac{a^2 c \csc ^2\left (\frac{1}{2} (e+f x)\right )}{32 f}+\frac{a^2 c \sec ^4\left (\frac{1}{2} (e+f x)\right )}{64 f}-\frac{a^2 c \sec ^2\left (\frac{1}{2} (e+f x)\right )}{32 f}-\frac{a^2 c \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{8 f}+\frac{a^2 c \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{8 f}-\frac{a^2 c \cot (e+f x) \csc ^2(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^5*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

(a^2*c*Cot[e + f*x])/(3*f) + (a^2*c*Csc[(e + f*x)/2]^2)/(32*f) - (a^2*c*Csc[(e + f*x)/2]^4)/(64*f) - (a^2*c*Co
t[e + f*x]*Csc[e + f*x]^2)/(3*f) + (a^2*c*Log[Cos[(e + f*x)/2]])/(8*f) - (a^2*c*Log[Sin[(e + f*x)/2]])/(8*f) -
 (a^2*c*Sec[(e + f*x)/2]^2)/(32*f) + (a^2*c*Sec[(e + f*x)/2]^4)/(64*f)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 109, normalized size = 1.3 \begin{align*}{\frac{{a}^{2}c\cot \left ( fx+e \right ) }{3\,f}}+{\frac{{a}^{2}c\cot \left ( fx+e \right ) \csc \left ( fx+e \right ) }{8\,f}}-{\frac{{a}^{2}c\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}}-{\frac{{a}^{2}c\cot \left ( fx+e \right ) \left ( \csc \left ( fx+e \right ) \right ) ^{2}}{3\,f}}-{\frac{{a}^{2}c\cot \left ( fx+e \right ) \left ( \csc \left ( fx+e \right ) \right ) ^{3}}{4\,f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^5*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)

[Out]

1/3*a^2*c*cot(f*x+e)/f+1/8*a^2*c*cot(f*x+e)*csc(f*x+e)/f-1/8/f*a^2*c*ln(csc(f*x+e)-cot(f*x+e))-1/3/f*a^2*c*cot
(f*x+e)*csc(f*x+e)^2-1/4*a^2*c*cot(f*x+e)*csc(f*x+e)^3/f

________________________________________________________________________________________

Maxima [B]  time = 0.968921, size = 223, normalized size = 2.59 \begin{align*} \frac{3 \, a^{2} c{\left (\frac{2 \,{\left (3 \, \cos \left (f x + e\right )^{3} - 5 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 12 \, a^{2} c{\left (\frac{2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + \frac{48 \, a^{2} c}{\tan \left (f x + e\right )} - \frac{16 \,{\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a^{2} c}{\tan \left (f x + e\right )^{3}}}{48 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/48*(3*a^2*c*(2*(3*cos(f*x + e)^3 - 5*cos(f*x + e))/(cos(f*x + e)^4 - 2*cos(f*x + e)^2 + 1) - 3*log(cos(f*x +
 e) + 1) + 3*log(cos(f*x + e) - 1)) - 12*a^2*c*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) +
log(cos(f*x + e) - 1)) + 48*a^2*c/tan(f*x + e) - 16*(3*tan(f*x + e)^2 + 1)*a^2*c/tan(f*x + e)^3)/f

________________________________________________________________________________________

Fricas [B]  time = 1.98511, size = 425, normalized size = 4.94 \begin{align*} -\frac{16 \, a^{2} c \cos \left (f x + e\right )^{3} \sin \left (f x + e\right ) + 6 \, a^{2} c \cos \left (f x + e\right )^{3} + 6 \, a^{2} c \cos \left (f x + e\right ) - 3 \,{\left (a^{2} c \cos \left (f x + e\right )^{4} - 2 \, a^{2} c \cos \left (f x + e\right )^{2} + a^{2} c\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 3 \,{\left (a^{2} c \cos \left (f x + e\right )^{4} - 2 \, a^{2} c \cos \left (f x + e\right )^{2} + a^{2} c\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right )}{48 \,{\left (f \cos \left (f x + e\right )^{4} - 2 \, f \cos \left (f x + e\right )^{2} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/48*(16*a^2*c*cos(f*x + e)^3*sin(f*x + e) + 6*a^2*c*cos(f*x + e)^3 + 6*a^2*c*cos(f*x + e) - 3*(a^2*c*cos(f*x
 + e)^4 - 2*a^2*c*cos(f*x + e)^2 + a^2*c)*log(1/2*cos(f*x + e) + 1/2) + 3*(a^2*c*cos(f*x + e)^4 - 2*a^2*c*cos(
f*x + e)^2 + a^2*c)*log(-1/2*cos(f*x + e) + 1/2))/(f*cos(f*x + e)^4 - 2*f*cos(f*x + e)^2 + f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**5*(a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.30705, size = 200, normalized size = 2.33 \begin{align*} \frac{3 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 8 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 24 \, a^{2} c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - 24 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + \frac{50 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 24 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 8 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 \, a^{2} c}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4}}}{192 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

1/192*(3*a^2*c*tan(1/2*f*x + 1/2*e)^4 + 8*a^2*c*tan(1/2*f*x + 1/2*e)^3 - 24*a^2*c*log(abs(tan(1/2*f*x + 1/2*e)
)) - 24*a^2*c*tan(1/2*f*x + 1/2*e) + (50*a^2*c*tan(1/2*f*x + 1/2*e)^4 + 24*a^2*c*tan(1/2*f*x + 1/2*e)^3 - 8*a^
2*c*tan(1/2*f*x + 1/2*e) - 3*a^2*c)/tan(1/2*f*x + 1/2*e)^4)/f